<template>
	<p>AComp</p>
	<p>{{ count }}</p>
	<button @click="update">更新</button>
</template>

<script>
export default {
	name: "AComp",
	props: {
		count: {
			type: Number,
			required: true,
		},
	},
	methods: {
		update() {
			this.$emit("update:count", this.count + 1);
		},
	},
	// mounted() {
	// 	console.log(this);
	// },
};
</script>

<style></style>
